package com.hnx.admin.system.controller;

import com.hnx.admin.system.service.CaptchaService;
import com.hnx.admin.web.json.ResultJson;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/*
项目名称： core
创 建 人: 倔强的头发
创建日期： 2025/5/26   8:53:12 
描   述：
*/
@RestController
@RequiredArgsConstructor
public class CaptchaController {
    private final CaptchaService captchaService;
    /**
     * 生成验证码
     */
    @GetMapping("/captchaImage")
    public ResultJson getCode(HttpServletResponse response)
    {
        return captchaService.getCode(response);
    }
}
